EXAMPLE
PYTHON IT INTRODUCES
MATHS & THINKING
01_my_first_game
walk to two coins
Giving a command with settings — coin(across=3, up=5). These are keyword arguments, real Python they keep forever.
Coordinates on two axes. Counting from 0 — genuinely hard at nine. Turn on show_grid() and let them count with a finger.
A loop (@every(1)), a rule (@when_touch), a function with a parameter, and score += 1.
Rates — one star per second. Speed as a number you feel. Modulo arrives naturally as "every 5th star".
Writing two rules side by side — one for ghosts, one for hearts — and asking an object to act: hero.say("ouch").
Balance. Tune hearts() and ghost speed until it's hard but fair. That is hypothesis testing.
Multi-line strings, and the idea that text can be data — the picture between the quotes IS the level.
A 2D grid: rows and columns. Then the real question — is every coin actually reachable? They must test it.
05_platformer
jump to the flag
Settings that interact: jump_power(3) against the height of every platform. One number changes everything.
Estimation and iteration. Put the flag out of reach and nothing errors — they play, find it impossible, and redesign.
06_keys_and_doors
locked door, 2 levels
Several things in one call — levels(a, b) — and state that persists: the keys you're carrying.
Dependency and sequence. B needs A first. The first real taste of designing a puzzle rather than a playground.
07_remix_a_builtin
change a finished game
Importing a module and reading code someone else wrote — gamebricks.load("platformer"), then editing it.
Abstraction. Noticing that all five games are the same six bricks, so a trick learned in one works in all of them.